#pragma once

#include <string>
#include <vector>

class FileLogger
{
public:
	FileLogger();
	~FileLogger();

	void SetPath(const char* filename);
	void SetMaxLog(size_t count);
	void Write(const char* buffer);
	void Flush();

protected:
	void WriteLine(std::string& line);

	critical_section lock_;
	std::string file_name_;
	std::vector<std::string> logs_;
	size_t max_log_;
};
